{include file="header.html"}
<script src="/js/ckeditor/ckeditor.js"></script>

<div class="page-header">
	<h6>
		商品分类管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			编辑商品分类
		</small>
	</h6>
</div><!-- /.page-header -->
<div class="row">
<div class="col-xs-12">
	<form class="form-horizontal" role="form" method="post" action="?app=category&act=edit" enctype="multipart/form-data">
		<input type="hidden" id="id" name="id" value="{$row->id}" class="col-xs-6" />
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="name"> 分类名称 </label>
			<div class="col-sm-10">
				<input type="text" id="name" name="name" value="{$row->name}" class="col-xs-6" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="parent_id"> 上级分类 </label>
			<div class="col-sm-10">
				<select name="parent_id" id="parent_id" class="form-control" style="width:155px;">
					<option value="">上级分类</option>
					{foreach from=$rs item=val}
					<option value="{$val->id}" {if $row->parent_id == $val->id}selected{/if}>{$val->name}</option>
					{/foreach}
				</select> 
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="pic"> 图片 </label>
			<div class="col-sm-10">
				<input type="file" id="pic" name="pic" value="" class="col-xs-6" />
				<img src="{$row->pic}" style="width:100px;">
				<span style="color: red;">(42*42)</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="memo"> 备注 </label>
			<div class="col-sm-10">
				<input type="text" id="memo" name="memo" value="{$row->memo}" class="col-xs-6" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="keywords"> 关键词 </label>
			<div class="col-sm-10">
				<input type="text" id="keywords" name="keywords" value="{$row->keywords}" class="col-xs-6" />
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="status"> 状态 </label>
			<div class="col-sm-10">
				<div class="radio">
					<label>
						<input type="radio" name="status" value="1"  class="ace" {if $row->status == 1 }checked{/if}/>
						<span class="lbl"> 正常</span>
					</label>
				</div>
				<div class="radio">
					<label>
						<input type="radio" name="status" value="0" class="ace" {if $row->status == 0 }checked{/if}/>
						<span class="lbl"> 隐藏 </span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="home_show"> 是否在首页显示 </label>
			<div class="col-sm-10">
				<div class="radio">
					<label>
						<input type="radio" name="home_show" value="1" {if $row->home_show == 1 }checked{/if} class="ace" />
						<span class="lbl"> 显示 </span>
					</label>
				</div>
				<div class="radio">
					<label>
						<input type="radio" name="home_show" value="0" {if $row->home_show == 0 }checked{/if} class="ace" />
						<span class="lbl"> 隐藏 </span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="home_name"> 首页显示名称 </label>
			<div class="col-sm-10">
				<input type="text" id="home_name" name="home_name" value="{$row->home_name}" class="col-xs-6" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="home_icon"> 首页显示图标 </label>
			<div class="col-sm-10">
				<input type="file" id="home_icon" name="home_icon" value="" class="col-xs-6" />
				<img src="{$row->home_icon}" style="width:100px;">
				<span style="color: red;">(42*42)</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="sort"> 排序 </label>
			<div class="col-sm-10">
				<input type="text" name="sort" id="sort" value="{$row->sort}" class="col-xs-2" /> 数字越小，排在越前
			</div>
		</div>
		<div class="clearfix form-actions">
			<div class="col-md-offset-3 col-md-9">
				<button class="btn btn-info" type="submit">
					<i class="ace-icon fa fa-check bigger-110"></i>
					提交
				</button>

				&nbsp; &nbsp; &nbsp;
				<button class="btn" type="reset">
					<i class="ace-icon fa fa-undo bigger-110"></i>
					重置
				</button>
			</div>
		</div>
	</form>
</div>
</div>

{include file="footer.html"}